package com.hyperchain.entity;

import lombok.Data;

import java.util.Date;
import java.io.Serializable;

/**
 * (DbAccount)实体类
 *
 * @author makejava
 * @since 2024-01-29 11:21:33
 */
@Data
public class DbAccount implements Serializable {
    private static final long serialVersionUID = 167408877219588510L;

    private Integer id;

    private String userName;

    private String password;

    private String email;

    private Date registerTime;

    private String avatar;

    private Boolean isAdmin;


    public boolean isAdmin() {
        return isAdmin(this.id);
    }

    public static boolean isAdmin(Integer userId) {
        return userId != null && 0 == userId;
    }

}

